The present invention relates generally to computer systems, and deals more particularly with a cache for virtual machines and logical partitions.
A virtual machine is a virtual sharing/partitioning of real resources such as real memory, CPU and I/O. A known virtual machine operating system includes a common base portion and separate user portions formed by the common base portion. In an IBM z/VM operating system, the common base portion is called the “Control Program” or “CP” and each user portion is called a “virtual machine” or “guest”. A guest operating system executes/runs on each virtual machine, and one or more applications run on the guest operating system. Each application and guest operating system operate as if they are running on their own private, real computer.
In some computing environments, resources are shared amongst multiple programs. Shared resources consist of shared data (including shared files and shared directories) and shared processing routines. For example, in IBM VM/370 shared data was stored in shared memory accessible by multiple virtual machines. Also, in IBM VM/CMS, some portions of memory private to the virtual machine are shared among multiple programs in the same virtual machine. VM/CMS uses private locks to determine when access to the shared memory can be parallel and when such access must be sequential. Also in VM/CMS, there are processing routines private to the virtual machine which all programs in the same virtual machine use to access external storage mediums. VM/CMS uses private locks to determine when shared processing routines can be executed in parallel and when such routines must be executed sequentially. While VM/CMS is effective in sharing resources, it is limited to sharing resources within a single virtual machine.
In IBM VM/SP6 operating system and subsequent releases of IBM VM/ESA and IBM z/VM operating systems, data to be shared amongst multiple virtual machines (with a common base portion) resides in private memory of one server virtual machine. Likewise, a lock management structure resides in the server virtual machine. This data is shared by multiple virtual machines by requiring all virtual machines to communicate with the server virtual machine to request access to the shared data. Such communication is in the form of TCP/IP, IUCV or Guest LAN messages (described below), which require significant overhead. The server virtual machine then uses its private locks to arbitrate access to the shared data. A similar arrangement is used to arbitrate the use of shared processing routines. While the foregoing arrangement provides access by multiple virtual machines to shared resources, it requires a significant overhead communication protocol between the requesting virtual machines and the server virtual machine.
In general, a cache is a high speed, limited capacity semiconductor memory such as RAM, which contains portions or pages of data stored on relatively slow access, magnetic disk. There are many known algorithms for determining which pages to retain in cache; however, typically, the least recently used pages are outpaged to storage to make room for new pages requested to be updated/written or read by a program. Because a program will typically perform multiple operations on a single page while resident in cache, the cache improves overall reading and writing speed. Thus, the combination of a cache and disk storage provide high speed access and large capacity storage.
Nonshared filesystem caches are known for both shared and nonshared files.
It was known for two different applications in the same real computer or the same virtual machine to share a read/write cache in memory for files stored in high capacity storage.
In a virtual machine environment, it was known to provide nonshared (i.e. private to/accessible by respective virtual machines or specific programs in each virtual machine) read/write caches in nonshared RAM for nonshared files in external (disk) storage. It was also known from U.S. Pat. No. 6,075,938 to provide a shared (i.e. shared by/accessible by multiple virtual machines and their programs) read-only cache in RAM for shared files in external (disk) storage.
It was known for a file system to store both file system data and file system metadata. The metadata comprises information about the file system data, such as a directory/hierarchy of files in the file system to locate a file of interest, size of file, etc. It was known to provide a nonshared cache for both file system data and file system metadata.
Logical partitions (“LPARs”) are also known today within a real computer. An LPAR is a logical partitioning of the real resources, i.e. CPU, RAM, etc. The CPU is logical partitioned by allocated time slices to respective LPARs. The RAM is logically partitioned by dividing the memory between the different partitions.
It was known for two different applications in the same LPAR to share a read/write cache in memory for files stored in high capacity storage.
A general object of the present invention is to provide a shared, read/write filesystem cache for high capacity storage in a virtual machine environment.
Another general object of the present invention is to provide a shared, read/write filesystem cache for high capacity storage in an LPAR environment.
Another object of the present invention is to provide such read/write filesystem caches in an effective and efficient manner.